package helper.form.inputs;

public class SearchInput extends BasicInput {
	public SearchInput(String name,String label) {
		super(name,label);
	}
	
	public SearchInput(String name,String label, String value) {
		super(name,label,value);
	}
	
	public SearchInput(String name,String label, String value, String cssClass) {
		super(name,label,value,cssClass);
	}
	
	public SearchInput(String name,String label, String value, String cssClass, String otherHtml) {
		super(name,label,value,cssClass,otherHtml);
	}
	
	
	
	public String render() {
		String output = this.renderLabel();
		output="<input type=\"search\" name=\""+this.name+"\"";
		
		if(!this.value.isEmpty()) {
			output+="value =\""+this.value+"\"";
		}
		if(!this.cssClass.isEmpty()) {
			output+="class =\""+this.cssClass+"\"";
		}
		if(!this.otherHtml.isEmpty()) {
			output+=this.otherHtml;
		}
		
		output+=" />\n";
		
		return output;
	}

}
